/* Ant Design 风格布局样式 */
:root {
    --primary-color: #1890ff;
    --header-bg: #001529;
    --sidebar-bg: #fff;
    --sidebar-width: 200px;
    --header-height: 64px;
    --border-color: #f0f0f0;
    --text-color: rgba(0, 0, 0, 0.85);
    --text-secondary: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
        'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
        'Noto Color Emoji';
}

/* 整体布局容器 */
.antd-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.antd-header {
    background: var(--header-bg);
    height: var(--header-height);
    line-height: var(--header-height);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.antd-header-left {
    display: flex;
    align-items: center;
    color: #fff;
}

.antd-header-logo {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-right: 40px;
    white-space: nowrap;
}

.antd-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.antd-header-exam-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.antd-header-exam-selector label {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 14px;
}

.antd-header-exam-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 2px;
    font-size: 14px;
    min-width: 140px;
    cursor: pointer;
    outline: none;
}

.antd-header-exam-selector select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.antd-header-exam-selector select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
}

.antd-header-exam-selector select option {
    background: #fff;
    color: #333;
}

/* 内容区域容器 */
.antd-layout-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* 左侧菜单 */
.antd-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    transition: all 0.3s;
}

.antd-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 16px 0;
}

.antd-sidebar-menu-item {
    margin: 0;
    padding: 0;
}

.antd-sidebar-menu-item a {
    display: block;
    padding: 12px 24px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    position: relative;
}

.antd-sidebar-menu-item a:hover {
    color: var(--primary-color);
    background: #e6f7ff;
}

.antd-sidebar-menu-item a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.antd-sidebar-menu-item a:hover:before,
.antd-sidebar-menu-item.active a:before {
    opacity: 1;
}

.antd-sidebar-menu-item.active a {
    color: var(--primary-color);
    background: #e6f7ff;
    font-weight: 500;
}

/* 主内容区域 */
.antd-main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    background: #f0f2f5;
    min-height: calc(100vh - var(--header-height));
}

.antd-page-header {
    background: #fff;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.antd-page-title {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
}

/* 内容卡片 */
.antd-content-card {
    background: #fff;
    border-radius: 2px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .antd-sidebar {
        transform: translateX(-100%);
    }

    .antd-sidebar.mobile-open {
        transform: translateX(0);
        z-index: 999;
    }

    .antd-main-content {
        margin-left: 0;
    }

    .antd-header-logo {
        font-size: 16px;
        margin-right: 16px;
    }

    .antd-header-exam-selector {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
}

/* 移动端菜单按钮 */
.antd-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px;
    margin-right: 16px;
}

@media screen and (max-width: 768px) {
    .antd-menu-toggle {
        display: block;
    }
}

/* 覆盖原有的样式 */
#sidebar {
    display: none !important;
}

#main {
    margin-left: 0 !important;
    padding: 0 !important;
}

/* 滚动条美化 */
.antd-sidebar::-webkit-scrollbar {
    width: 6px;
}

.antd-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.antd-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 表格样式优化 */
.antd-main-content .table {
    background: #fff;
}

.antd-main-content .card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    border-radius: 2px;
}

.antd-main-content .card .card-header {
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* 按钮样式优化 */
.antd-main-content .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.antd-main-content .btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

/* 面包屑样式 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item:before {
    content: '/';
    color: var(--text-secondary);
}

